#include <opencv2/opencv.hpp>

int main(int argc, const char **argv)
{

    cv::VideoCapture capture(argv[1]);
    // std::string addr1 = "~/Downloads/Glen2020-09-09.mp4";
    // cv::VideoCapture capture(addr1);

    while (1)
    {
        cv::Mat frame;
        capture >> frame;   //读取当前帧

        if(frame.empty()){
            break;
        }
        cv::imshow("show_video", frame);    //显示当前帧
        cv::waitKey(15);    //延时10ms,控制帧率
    }

    return 0;
}
